<a href="javascript: <?php echo $activity->getJSFunction()->getName()?>()">Create activity</a>
<div id="activity_<?php echo $activity->getActivityVarName() ?>_div"></div>

<script type="text/javascript">

  var div = document.getElementById('activity_<?php echo $activity->getActivityVarName() ?>_div');

  function <?php echo $activity->getJSFunction()->getName()?>() {  
    <?php $activity->setTitle(sprintf($activity->getPattern('title'),'eu','lah lah','aa')); 
          $activity->createActivity(false);
          echo $activity;
    ?>
    
  }
</script>

